package com.fc.hkx.api;

import com.fc.hkx.common.ResponseJson;
import com.fc.hkx.thirdparty.scenery.SceneryApiService;
import com.fc.hkx.thirdparty.scenery.dto.GetSceneryListRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by futurecreative on 2017/9/9.
 */
@RestController
@RequestMapping("/api/sce")
public class SceneryController {
    @Autowired
    private SceneryApiService sceneryApiService;

    @RequestMapping("/list")
    public ResponseJson list(@RequestBody GetSceneryListRequest getSceneryListRequest) throws Exception {
        ResponseJson responseJson = new ResponseJson();
        responseJson.setObj(sceneryApiService.searchScenery(getSceneryListRequest));
        return responseJson;
    }
}
